﻿@{
    ViewBag.Title = "预约记录";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<div class="ph-tabs">
    <ul>
        <li class="k-state-active">预约记录</li>
    </ul>
    <div>
        <!--<div class="k-block divToolbar">
            <span class="k-textbox k-space-right">
                <input type="text" placeholder="请输入班级名称" id="txtKey" />
                <a href="javascript:FilterClass()" class="k-icon k-i-search">&nbsp;</a>
            </span>
            <button class="k-button" onclick="CreateNewClass()"><span class="k-icon k-i-plus"></span><span>添加新班级</span></button>
        </div>-->
        <div id="grid" style="text-align: center"></div>
    </div>
</div>

<script class="grid_class_columns">
    var classFields = [{
        title: "预约号",
        field: "BookNo",
        width: 100
    }, {
        title: "学校",
        field: "SchoolName",
        width: 150
    }, {
        title: "班级",
        field: "ClassName",
        width: 150
    }, {
        title: "姓名",
        field: "StudentName",
        width: 100
    }, {
        title: "预约时间",
        template: "#=kendo.toString(kendo.parseDate(BookTime),'yyyy-MM-dd')#",
        width: 100
    }, {}];
</script>

<script class="grid_config">
    $(function () {
        $("#grid").kendoGrid({
            columns: classFields,
            dataSource: Whale.dataSource({
                url: "/Temps/TBook/Gets",
                pageSize: 15

            }),
            pageable: {
                messages: {
                    empty: "暂无数据"
                }
            },
            dataBound: function (e) {
                //让表头居中
                $("th.k-header").attr("style", "text-align:center; font-weight:bold;");
            }
        });
    });
</script>
